Tag = "Paste:Paste clipboard contents into document"
Top = 30
Width = 360
End
Begin Image imgHelp
Height = 330
Left = 7320
Picture = TIPDEMO.FRX:090C
Tag = "Help:Open ToolTip help file"
Top = 30
Width = 360
End
End
Begin GSTabFrame GSTabFrame1
BackColor = &H00C0C0C0&
BufferDisplay = -1 'True
Caption = "General"
Height = 4275
Index = 0
Left = 120
TabGroup = 0
TabIndex = 7
TabNumber = 0
Tag = "General Information:Show general information about the ToolTip control."
Top = 480
Width = 7635
Begin Label Label2
BackStyle = 0 'Transparent
Caption = "This demonstration also includes the TabFrame control which allows you to implement tabbed dialog boxes in Visual Basic. A full demonstration of this control is available for download in the MSBASIC forum on Compuserve - see file TABFRAME.ZIP in library 17 (3rd Party Products)."
Height = 855
Left = 180
TabIndex = 65
Top = 2040
Width = 7095
End
Begin Label Label22
BackStyle = 0 'Transparent
Caption = "If you have any comments or suggestions concerning this control then please contact Graham Cockell (Compuserve ID 100113, 2774) via e-mail or on the Compuserve MSBASIC forum."
Height = 615
Left = 180
TabIndex = 66
Top = 2940
Width = 7035
End
Begin Label Label20
BackStyle = 0 'Transparent
Caption = "This product is distributed as shareware and registration details are provided in this demonstration and in the help file - click the help button on the toolbar."
Height = 375
Left = 180
TabIndex = 67
Top = 3660
Width = 7155
End
Begin Label Label19
BackStyle = 0 'Transparent
Caption = "The ToolTip control allows you to quikly add MS style tool tips and a context sensitive status bar to your Visual Basic applications. In addition to supporting popup tool tip windows the control provides events for tracking mouse movements, menu selections and focus changes within your application. Examples of each of these functions can be viewed by selecting the appropriate tab by clicking it with the left mouse button."
Height = 1215
Left = 180
TabIndex = 68
Top = 780
Width = 7155
End
End
Begin GSTabFrame GSTabFrame1
BackColor = &H00C0C0C0&
BufferDisplay = -1 'True
Caption = "Registration"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 4275
Index = 3
Left = 120
TabGroup = 0
TabIndex = 10
TabNumber = 3
Tag = "Registration Information:Show details of how to register the ToolTip control."
Top = 480
Width = 7635
Begin Label Label26
BackStyle = 0 'Transparent
Caption = "Registered versions will be sent out by e-mail unless otherwise specified."
Height = 255
Left = 300
TabIndex = 64
Top = 3900
Width = 6915
End
Begin Label Label17
BackStyle = 0 'Transparent
Caption = "ENGLAND"
Height = 195
Left = 1200
TabIndex = 63
Top = 3600
Width = 3255
End
Begin Label Label16
BackStyle = 0 'Transparent
Caption = "Derbyshire DE6 1PR"
Height = 195
Left = 1200
TabIndex = 62
Top = 3420
Width = 3255
End
Begin Label Label15
BackStyle = 0 'Transparent
Caption = "Ashbourne"
Height = 195
Left = 1200
TabIndex = 61
Top = 3240
Width = 3255
End
Begin Label Label14
BackStyle = 0 'Transparent
Caption = "Hognaston"
Height = 195
Left = 1200
TabIndex = 60
Top = 3060
Width = 3255
End
Begin Label Label13
BackStyle = 0 'Transparent
Caption = "Fellsgarth House"
Height = 195
Left = 1200
TabIndex = 59
Top = 2880
Width = 3255
End
Begin Label Label12
BackStyle = 0 'Transparent
Caption = "GC Consulting Services Ltd"
Height = 195
Left = 1200
TabIndex = 58
Top = 2700
Width = 3255
End
Begin Label Label11
BackStyle = 0 'Transparent
Caption = "2) By sending a cheque or money order for
25 to :"
Height = 255
Left = 240
TabIndex = 57
Top = 2400
Width = 6795
End
Begin Label Label10
BackStyle = 0 'Transparent
Caption = "1) Through the SWREG forum on Compuserve. The fee is $29.95 and the registration ID is 2275."
Height = 435
Left = 240
TabIndex = 56
Top = 1920
Width = 6915
End
Begin Label Label9
BackStyle = 0 'Transparent
Caption = "If you find the ToolTip control useful you can receive the full version, which may be distributed with your applications, by registering as follows :"
Height = 435
Left = 240
TabIndex = 55
Top = 1440
Width = 6855
End
Begin Label Label8
BackStyle = 0 'Transparent
Caption = "This demonstration includes a fully functional version of the ToolTip control which may be used in the Visual Basic development environment only. It cannot be used in conjunction with an EXE file produced from Visual Basic."
Height = 615
Left = 240
TabIndex = 54
Top = 780
Width = 7035
End
End
Begin GSTabFrame GSTabFrame1
BackColor = &H00C0C0C0&
BufferDisplay = -1 'True
Caption = "Menu Tracking"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 4275
Index = 6
Left = 120
TabGroup = 1
TabIndex = 48
TabNumber = 2
Tag = "Menu Tracking Details:Show details of menu tracking facilities provided by the ToolTip control"
Top = 480
Width = 7635
Begin Frame Frame3
BackColor = &H00C0C0C0&
Caption = "MenuSelect Event"
Height = 975
Left = 480
TabIndex = 76
Top = 3060
Width = 6495
Begin Label lblMenuCaption
BackStyle = 0 'Transparent
Height = 195
Left = 1740
TabIndex = 80
Top = 600
Width = 4515
End
Begin Label lblMenuName
BackStyle = 0 'Transparent
Height = 195
Left = 1740
TabIndex = 79
Top = 360
Width = 4515
End
Begin Label Label25
BackStyle = 0 'Transparent
Caption = "MenuCaption:"
Height = 195
Index = 1
Left = 360
TabIndex = 78
Top = 600
Width = 1275
End
Begin Label Label25
BackStyle = 0 'Transparent
Caption = "MenuName:"
Height = 195
Index = 0
Left = 360
TabIndex = 77
Top = 360
Width = 1275
End
End
Begin Label Label29
BackStyle = 0 'Transparent
Caption = "The box below ishows the event parameters each time a MenuSelect event is generated. Select the menus on this form and watch as they are updated. Notice that the system menu is recognised as well as the application menus."
Height = 615
Left = 300
TabIndex = 83
Top = 2220
Width = 6915
End
Begin Label Label28
BackStyle = 0 'Transparent
Caption = "The MenuSelect event can be used to update a status bar, like the one at the bottom of this form, in order to provide the user with information about the function of the currently selected menu item."
Height = 615
Left = 300
TabIndex = 82
Top = 1560
Width = 6915
End
Begin Label Label27
BackStyle = 0 'Transparent
Caption = "The ToolTip control tracks menu selections and generates a MenuSelect event for each item. Each ToolTip control can provide menu tracking for the form containing the control and, if it is an MDI form, for the menus on MDI child forms."
Height = 615
Left = 300
TabIndex = 81
Top = 900
Width = 6915
End
End
Begin GSTabFrame GSTabFrame1
BackColor = &H00C0C0C0&
BufferDisplay = -1 'True
Caption = "Events"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 4275
Index = 2
Left = 120
TabGroup = 0
TabIndex = 9
TabNumber = 2
Tag = "ToolTip Events:Show details of events supported by the ToolTip control"
Top = 480
Width = 7635
Begin GSTabFrame GSTabFrame3
ActiveColor = &H0080FFFF&
BackColor = &H00C0C0C0&
Caption = "Custom"
Height = 3075
InactiveColor = &H00FFFF80&
Index = 0
Left = 360
Position = 1 'Bottom
Style = 0 '2D
TabGroup = 0
TabIndex = 19
TabNumber = 0
Top = 900
Width = 6795
Begin ComboBox cboEventName
Height = 300
Left = 1620
Sorted = -1 'True
Style = 2 'Dropdown List
TabIndex = 22
Top = 180
Width = 4875
End
Begin TextBox txtEventDesc
BackColor = &H00FFFFFF&
Enabled = 0 'False
Height = 1875
Left = 1620
MultiLine = -1 'True
TabIndex = 21
Text = "txtEventDesc"
Top = 660
Width = 4875
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "Event:"
Height = 195
Index = 2
Left = 240
TabIndex = 13
Top = 240
Width = 1095
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "Description:"
Height = 195
Index = 3
Left = 240
TabIndex = 14
Top = 660
Width = 1095
End
End
Begin GSTabFrame GSTabFrame3
ActiveColor = &H0080FFFF&
BackColor = &H00C0C0C0&
Caption = "Standard"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 3075
InactiveColor = &H00FFFF80&
Index = 1
Left = 360
Position = 1 'Bottom
Style = 0 '2D
TabGroup = 0
TabIndex = 20
TabNumber = 1
Top = 900
Width = 6795
Begin Label Label6
BackStyle = 0 'Transparent
Caption = "There are no standard events supported by the ToolTip control."
Height = 195
Left = 180
TabIndex = 50
Top = 180
Width = 6495
End
End
End
Begin GSTabFrame GSTabFrame1
BackColor = &H00C0C0C0&
BufferDisplay = -1 'True
Caption = "Properties"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 4275
Index = 1
Left = 120
TabGroup = 0
TabIndex = 8
TabNumber = 1
Tag = "ToolTip Properties:Show details of properties supported by the ToolTip control"
Top = 480
Width = 7635
Begin GSTabFrame GSTabFrame2
ActiveColor = &H0080FFFF&
BackColor = &H00C0C0C0&
Caption = "Custom"
Height = 3075
InactiveColor = &H00FFFF80&
Index = 0
Left = 360
Position = 1 'Bottom
Style = 0 '2D
TabGroup = 0
TabIndex = 15
TabNumber = 0
Top = 900
Width = 6795
Begin TextBox txtpropDesc
BackColor = &H00FFFFFF&
Enabled = 0 'False
Height = 1875
Left = 1620
MultiLine = -1 'True
TabIndex = 11
Text = "txtPropDesc"
Top = 660
Width = 4875
End
Begin ComboBox cboPropName
Height = 300
Left = 1620
Sorted = -1 'True
Style = 2 'Dropdown List
TabIndex = 12
Top = 180
Width = 4875
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "Description:"
Height = 195
Index = 1
Left = 240
TabIndex = 18
Top = 660
Width = 1095
End
Begin Label Label1
BackStyle = 0 'Transparent
Caption = "Property:"
Height = 195
Index = 0
Left = 240
TabIndex = 17
Top = 240
Width = 1095
End
End
Begin GSTabFrame GSTabFrame2
ActiveColor = &H0080FFFF&
BackColor = &H00C0C0C0&
Caption = "Standard"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 3075
InactiveColor = &H00FFFF80&
Index = 1
Left = 360
Position = 1 'Bottom
Style = 0 '2D
TabGroup = 0
TabIndex = 16
TabNumber = 1
Top = 900
Width = 6795
Begin Label Label4
BackStyle = 0 'Transparent
Caption = "Name"
Height = 195
Index = 1
Left = 2940
TabIndex = 46
Top = 1200
Width = 1095
End
Begin Label Label5
BackStyle = 0 'Transparent
Caption = "The colour and font properties control the appearance of the tool tip popup window and the Enabled property can be used to prevent all events from being generated."
Height = 615
Left = 120
TabIndex = 51
Top = 1560
Width = 6495
End
Begin Label Label4
BackStyle = 0 'Transparent
Caption = "FontStrikethru"
Height = 195
Index = 29
Left = 1560
TabIndex = 53
Top = 960
Width = 1275
End
Begin Label Label4
BackStyle = 0 'Transparent
Caption = "FontSize"
Height = 195
Index = 28
Left = 1560
TabIndex = 52
Top = 720
Width = 1215
End
Begin Label Label4
BackStyle = 0 'Transparent
Caption = "Top"
Height = 195
Index = 21
Left = 4260
TabIndex = 45
Top = 720
Width = 1095
End
Begin Label Label4
BackStyle = 0 'Transparent
Caption = "Tag"
Height = 195
Index = 20
Left = 4260
TabIndex = 44
Top = 480
Width = 1095
End
Begin Label Label4
BackStyle = 0 'Transparent
Caption = "Left"
Height = 195
Index = 16
Left = 2940
TabIndex = 40
Top = 960
Width = 1095
End
Begin Label Label4
BackStyle = 0 'Transparent
Caption = "Index"
Height = 195
Index = 15
Left = 2940
TabIndex = 39
Top = 720
Width = 1095
End
Begin Label Label4
BackStyle = 0 'Transparent
Caption = "ForeColor"
Height = 195
Index = 11
Left = 2940
TabIndex = 35
Top = 480
Width = 1095
End
Begin Label Label4
BackStyle = 0 'Transparent
Caption = "FontUnderline"
Height = 195
Index = 10
Left = 1560
TabIndex = 34
Top = 1200
Width = 1275
End
Begin Label Label4
BackStyle = 0 'Transparent
Caption = "FontName"
Height = 195
Index = 7
Left = 1560
TabIndex = 31
Top = 480
Width = 1215
End
Begin Label Label4
BackStyle = 0 'Transparent
Caption = "FontItalic"
Height = 195
Index = 6
Left = 300
TabIndex = 30
Top = 1200
Width = 1215
End
Begin Label Label4
BackStyle = 0 'Transparent
Caption = "FontBold"
Height = 195
Index = 5
Left = 300
TabIndex = 29
Top = 960
Width = 1215
End
Begin Label Label4
BackStyle = 0 'Transparent
Caption = "Enabled"
Height = 195
Index = 4
Left = 300
TabIndex = 28
Top = 720
Width = 1215
End
Begin Label Label4
BackStyle = 0 'Transparent
Caption = "BackColor"
Height = 195
Index = 0
Left = 300
TabIndex = 24
Top = 480
Width = 1215
End
Begin Label Label3
BackStyle = 0 'Transparent
Caption = "The following standard properties are supported by the ToolTip control :-"
Height = 195
Left = 180
TabIndex = 23
Top = 180
Width = 6495
End
End
End
Begin GSTabFrame GSTabFrame1
BackColor = &H00C0C0C0&
BufferDisplay = -1 'True
Caption = "Mouse Tracking"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 4275
Index = 5
Left = 120
TabGroup = 1
TabIndex = 33
TabNumber = 1
Tag = "Mouse Tracking Details:Show details of mouse tracking facilities provided by the ToolTip control"
Top = 480
Width = 7635
Begin Frame Frame2
BackColor = &H00C0C0C0&
Caption = "MouseExit Event"
Height = 915
Left = 3900
TabIndex = 36
Top = 3120
Width = 3315
Begin Label Label18
BackStyle = 0 'Transparent
Caption = "CtlName:"
Height = 195
Index = 3
Left = 240
TabIndex = 72
Top = 540
Width = 855
End
Begin Label Label18
BackStyle = 0 'Transparent
Caption = "FrmName:"
Height = 195
Index = 2
Left = 240
TabIndex = 71
Top = 300
Width = 855
End
Begin Label lblMouseExitFrmName
BackStyle = 0 'Transparent
Height = 195
Left = 1140
TabIndex = 37
Top = 300
Width = 2115
End
Begin Label lblMouseExitCtlName
BackStyle = 0 'Transparent
Height = 195
Left = 1140
TabIndex = 38
Top = 540
Width = 2115
End
End
Begin Frame Frame1
BackColor = &H00C0C0C0&
Caption = "MouseEnter Event"
Height = 915
Left = 300
TabIndex = 41
Top = 3120
Width = 3315
Begin Label Label18
BackStyle = 0 'Transparent
Caption = "CtlName:"
Height = 195
Index = 1
Left = 240
TabIndex = 70
Top = 540
Width = 855
End
Begin Label Label18
BackStyle = 0 'Transparent
Caption = "FrmName:"
Height = 195
Index = 0
Left = 240
TabIndex = 69
Top = 300
Width = 855
End
Begin Label lblMouseEnterCtlName
BackStyle = 0 'Transparent
Height = 195
Left = 1140
TabIndex = 42
Top = 540
Width = 2115
End
Begin Label lblMouseEnterFrmName
BackStyle = 0 'Transparent
Height = 195
Left = 1140
TabIndex = 43
Top = 300
Width = 2115
End
End
Begin Label Label24
BackStyle = 0 'Transparent
Caption = "The boxes below show the event parameters each time a MouseEnter or MouseExit event is generated. Move the mouse around the form and watch as they are updated. Notice that each of the tabs is recognised as a separate control - the ToolTip control works with the TabFrame control to provide this functionality."
Height = 975
Left = 300
TabIndex = 75
Top = 2100
Width = 6915
End
Begin Label Label23
BackStyle = 0 'Transparent
Caption = "The MouseEnter and MouseExit events can be used to update a status bar, like the one at the bottom of this form, in order to provide the user with information about the function of the control which the mouse is currently over."
Height = 615
Left = 300
TabIndex = 74
Top = 1440
Width = 6915
End
Begin Label Label21
BackStyle = 0 'Transparent
Caption = "The ToolTip control tracks movement of the mouse and generates MouseEnter and MouseExit events as the cursor moves into and out of each control. A single ToolTip control can provide mouse tracking for all the forms in an application."
Height = 615
Left = 300
TabIndex = 73
Top = 780
Width = 6915
End
End
Begin GSTabFrame GSTabFrame1
BackColor = &H00C0C0C0&
BufferDisplay = -1 'True
Caption = "ToolTips"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 4275
Index = 4
Left = 120
TabGroup = 1
TabIndex = 47
TabNumber = 0
Tag = "ToolTip Details:Show details of tool tip facilities provided by the ToolTip control"
Top = 480
Width = 7635
Begin Image Image2
Height = 420
Index = 1
Left = 300
Picture = TIPDEMO.FRX:0A8E
Tag = "ToolTip:Pause to show a multi-line tool tip"
Top = 1380
Width = 420
End
Begin Label Label36
BackStyle = 0 'Transparent
Caption = "Move the cursor over the ToolTip icon to the left to display a multi-line tool tip with a different background colour."
Height = 435
Left = 960
TabIndex = 100
Top = 1380
Width = 6315
End
Begin Label Label35
BackStyle = 0 'Transparent
Caption = "A single ToolTip control can provide tool tips for all the forms in an application. The tool tip text can be supplied in the GetToolTip event or taken from the Tag property of the control for which the tool tip is being shown. In many cases it will be convenient to use the GetToolTip event to extract a section of the Tag property to be used as the tool tip - see the event procedures in this demonstartion for an example of how the Tag prpoerty can be used to supply tool tips, status bar text and focus change text."
Height = 1395
Left = 300
TabIndex = 99
Top = 2700
Width = 6915
End
Begin Label Label34
BackStyle = 0 'Transparent
Caption = "Tool tips have been made popular by the latest releases of Microsoft Word and Excel and are rapidly becoming a standard part of many major Windows applications. Together with an intelligently updated status bar they help to make an application much easier to use."
Height = 795
Left = 300
TabIndex = 98
Top = 1860
Width = 6915
End
Begin Label Label33
BackStyle = 0 'Transparent
Caption = "Move the cursor over the ToolTip icon to the left and pause for a short while. That small popup window is a tool tip."
Height = 435
Left = 960
TabIndex = 97
Top = 900
Width = 6195
End
Begin Image Image2
Height = 420
Index = 0
Left = 300
Picture = TIPDEMO.FRX:0CC8
Tag = "ToolTip:Pause to show a tool tip"
Top = 900
Width = 420
End
End
Begin GSTabFrame GSTabFrame1
BackColor = &H00C0C0C0&
BufferDisplay = -1 'True
Caption = "Focus Tracking"
FontBold = 0 'False
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 4275
Index = 7
Left = 120
TabGroup = 1
TabIndex = 49
TabNumber = 3
Tag = "Focus Tracking Details:Show details of focus tracking facilities provided by the ToolTip control"
Top = 480
Width = 7635
Begin CommandButton Command2
Caption = "Command2"
Height = 375
Left = 4860
TabIndex = 5
Tag = "::Click to initiate Command1"
Top = 2700
Width = 1095
End
Begin CheckBox Check1
BackColor = &H00C0C0C0&
Caption = "Check1"
Height = 255
Left = 3660
TabIndex = 4
Tag = "::Click to select Check1"
Top = 2760
Width = 1035
End
Begin CommandButton Command1
Caption = "Command1"
Height = 375
Left = 6120
TabIndex = 6
Tag = "::Click to initiate Command2"
Top = 2700
Width = 1095
End
Begin TextBox Text2
Height = 285
Left = 1920
TabIndex = 3
Tag = "::Enter text for Text2"
Text = "Text2"
Top = 2760
Width = 1455
End
Begin TextBox Text1
Height = 285
Left = 300
TabIndex = 2
Tag = "::Enter text for Text1"
Text = "Text1"
Top = 2760
Width = 1335
End
Begin Frame Frame5
BackColor = &H00C0C0C0&
Caption = "GotFocus Event"
Height = 915
Left = 300
TabIndex = 91
Top = 3120
Width = 3315
Begin Label lblGotFocusFrmName
BackStyle = 0 'Transparent
Height = 195
Left = 1140
TabIndex = 95
Top = 300
Width = 2115
End
Begin Label lblGotFocusCtlName
BackStyle = 0 'Transparent
Height = 195
Left = 1140
TabIndex = 94
Top = 540
Width = 2115
End
Begin Label Label18
BackStyle = 0 'Transparent
Caption = "FrmName:"
Height = 195
Index = 7
Left = 240
TabIndex = 93
Top = 300
Width = 855
End
Begin Label Label18
BackStyle = 0 'Transparent
Caption = "CtlName:"
Height = 195
Index = 6
Left = 240
TabIndex = 92
Top = 540
Width = 855
End
End
Begin Frame Frame4
BackColor = &H00C0C0C0&
Caption = "LostFocus Event"
Height = 915
Left = 3900
TabIndex = 86
Top = 3120
Width = 3315
Begin Label lblLostFocusCtlName
BackStyle = 0 'Transparent
Height = 195
Left = 1140
TabIndex = 90
Top = 540
Width = 2115
End
Begin Label lblLostFocusFrmName
BackStyle = 0 'Transparent
Height = 195
Left = 1140
TabIndex = 89
Top = 300
Width = 2115
End
Begin Label Label18
BackStyle = 0 'Transparent
Caption = "FrmName:"
Height = 195
Index = 5
Left = 240
TabIndex = 88
Top = 300
Width = 855
End
Begin Label Label18
BackStyle = 0 'Transparent
Caption = "CtlName:"
Height = 195
Index = 4
Left = 240
TabIndex = 87
Top = 540
Width = 855
End
End
Begin Label Label32
BackStyle = 0 'Transparent
Caption = "The boxes below show the event parameters each time a GotFocus or LostFocus event is generated. Use the Tab key to move focus around the form and watch as they are updated."
Height = 615
Left = 300
TabIndex = 96
Top = 2100
Width = 6915
End
Begin Label Label31
BackStyle = 0 'Transparent
Caption = "The GotFocus and LostFocus events can be used to update a status bar, like the one at the bottom of this form, in order to provide the user with information about the function of the control which currently has the focus."
Height = 615
Left = 300
TabIndex = 85
Top = 1440
Width = 6915
End
Begin Label Label30
BackStyle = 0 'Transparent
Caption = "The ToolTip control tracks the control which has the input focus and generates GotFocus and LostFocus events. A single ToolTip control can provide focus tracking for all the forms in an application."
Height = 615
Left = 300
TabIndex = 84
Top = 780
Width = 6915
End
End
Begin Menu mnuFile
Caption = "&File"
Tag = "File operations"
Begin Menu mnuFNew
Caption = "&New"
Tag = "Create new document"
End
Begin Menu mnuFOpen
Caption = "&Open..."
Tag = "Open existing file"
End
Begin Menu mnuFSave
Caption = "&Save"
Tag = "Save file"
End
Begin Menu mnuFSaveAs
Caption = "Save &As..."
Tag = "Save file with new filename"
End
Begin Menu mnuFSep1
Caption = "-"
End
Begin Menu mnuFExit
Caption = "E&xit"
Tag = "Exit demonstartion"
End
End
Begin Menu mnuEdit
Caption = "&Edit"
Tag = "Clipboard operations"
Begin Menu mnuECut
Caption = "Cu&t"
Shortcut = ^X
Tag = "Cut selected text to clipboard"
End
Begin Menu mnuECopy
Caption = "&Copy"
Shortcut = ^C
Tag = "Copy selected text to clipboard"
End
Begin Menu mnuEPaste
Caption = "&Paste"
Shortcut = ^V
Tag = "Paste text from clipboard"
End
Begin Menu mnuEDelete
Caption = "&Delete"
Shortcut = {DEL}
Tag = "Delete selected text"
End
End
Begin Menu mnuView
Caption = "&View"
Tag = "Select new tab"
Begin Menu mnuVTab
Caption = "&General"
Index = 0
Tag = "Show general information about ToolTip control"
End
Begin Menu mnuVTab
Caption = "&Properties"
Index = 1
Tag = "Show details of ToolTip properies"
End
Begin Menu mnuVTab
Caption = "&Events"
Index = 2
Tag = "Show details of ToolTip events"
End
Begin Menu mnuVTab
Caption = "&Registration"
Index = 3
Tag = "How to register the ToolTip control"
End
Begin Menu mnuVTab
Caption = "&ToolTips"
Index = 4
Tag = "Description of tool tip operation"
End
Begin Menu mnuVTab
Caption = "&Mouse Tracking"
Index = 5
Tag = "Description of mouse tracking"
End
Begin Menu mnuVTab
Caption = "Me&nu Tracking"
Index = 6
Tag = "Description of menu tracking"
End
Begin Menu mnuVTab
Caption = "&Focus Tracking"
Index = 7
Tag = "Description of focus tracking"
End
End
Begin Menu mnuHelp
Caption = "&Help"
Tag = "Help system operations"
Begin Menu mnuHContents
Caption = "&Contents"
Tag = "Display help contents for ToolTip control"
End
Begin Menu mnuHSep1
Caption = "-"
End
Begin Menu mnuHAbout
Caption = "&About..."
Tag = "Display About dialog"
End
End
Option Explicit
Dim sHelpFile As String
Declare Function WinHelp Lib "User" (ByVal hWnd As Integer, ByVal lpHelpFile As String, ByVal wCommand As Integer, dwData As Any) As Integer
Sub cboEventName_Click ()
Dim EventDesc As String
Select Case cboEventName.List(cboEventName.ListIndex)
Case "GetToolTip"
EventDesc = "This event is fired when a tool tip window is about to be displayed and allows the user to specify the tool tip text."
Case "MouseEnter"
EventDesc = "This event is fired when the mouse enters a control. The Tag property of the control which the mouse is entering is passed as a parameter and may be used to determine the text to be displayed on a status bar."
Case "MouseExit"
EventDesc = "This event is fired when the mouse leaves a control."
Case "MenuSelect"
EventDesc = "This event is fired when a menu item is selected. The Tag property of the selected menu control is passed as a parameter and may be used to determine the text to be displayed on a status bar."
Case "GotFocus"
EventDesc = "This event is fired when a control receives the input focus. The Tag property of the control receiving the focus is passed as a parameter and may be used to determine the text to be displayed on a status bar."
Case "LostFocus"
EventDesc = "This event is fired when a control loses the input focus."
End Select
txtEventDesc.Text = EventDesc
End Sub
Sub cboPropName_Click ()
Dim PropDesc As String
Select Case cboPropName.List(cboPropName.ListIndex)
Case "About"
PropDesc = "This property, which is only available at design time, can be used to display the About dialog which identifies the ToolTip version number."
Case "Scope"
PropDesc = "This property determines which controls are monitored by the ToolTip control. If set to 0 (Application) the ToolTip control monitors controls on all forms except those which contain another ToolTip control. If set to 1 (Form) the ToolTip control only monitors controls on it's own form."
Case "ToolTips"
PropDesc = "This property determines how tool tips are generated. If enabled the Tag property of the control for which the tool tip is being generated can be used as the default tool tip text."
Case "Delay1, Delay2"
PropDesc = "These properties determine how long the mouse must remian over a control before the tool tip window appears. Delay1 controls the normal delay and Delay2 controls the delay immediately after a tool tip has been displayed. Keeping Delay2 short allows users to browse a toolbar without having to wait for each new tool tip to appear."
Case "AutoPosition"
PropDesc = "This property controls the positioning of the tool tip window relative to the current cursor position. If set True the ToolTip control positions the tool tip window automatically according to the current cursor (e.g. arrow, I-beam). If False the user controls the position using the OffsetX and OffsetY properties."
Case "OffsetX, OffsetY"
PropDesc = "These properties can be used to manually control the position of the tool tip window."
Case "Shadow"
PropDesc = "This property controls the size of the shadow used to highlight the tool tip window."
Case "MouseTracking"
PropDesc = "This property is used to enable/disable the MouseEnter and MouseExit events."
Case "MenuTracking"
PropDesc = "This property is used to enable/disable the MenuSelect event."
Case "FocusTracking"
PropDesc = "This property is used to enable/disable the GotFocus and LostFocus events."
Case "SubclassForm"
PropDesc = "This property is used to enable/disable the subclassing of the form required to track menu activity. It is only required in special circumstances as discussed in the Help file."
Case "ToolTipText"
PropDesc = "This property can be used to control the display of tool tip windows directlty."
End Select
txtPropDesc.Text = PropDesc
End Sub
Sub Form_Load ()
' position in centre of screen
Left = (Screen.Width - Width) / 2
Top = (Screen.Height - Height) / 2
' get help file name
sHelpFile = App.Path
If Right$(sHelpFile, 1) <> "\" Then sHelpFile = sHelpFile & "\"
sHelpFile = sHelpFile & "ToolTip.Hlp"
' load property combo box
cboPropName.Clear
cboPropName.AddItem "About"
cboPropName.AddItem "Scope"
cboPropName.AddItem "ToolTips"
cboPropName.AddItem "Delay1, Delay2"
cboPropName.AddItem "AutoPosition"
cboPropName.AddItem "OffsetX, OffsetY"
cboPropName.AddItem "Shadow"
cboPropName.AddItem "MenuTracking"
cboPropName.AddItem "MouseTracking"
cboPropName.AddItem "FocusTracking"
cboPropName.AddItem "SubclassForm"
cboPropName.AddItem "ToolTipText"
cboPropName.ListIndex = 0
' load event combo box
cboEventName.Clear
cboEventName.AddItem "GetToolTip"
cboEventName.AddItem "MouseEnter"
cboEventName.AddItem "MouseExit"
cboEventName.AddItem "MenuSelect"
cboEventName.AddItem "GotFocus"
cboEventName.AddItem "LostFocus"
cboEventName.ListIndex = 0
' initialise tab and menu
GSTabFrame1(0).Active = True
mnuVTab(0).Checked = True
End Sub
Sub GSTabFrame1_Activated (Index As Integer)
mnuVTab(Index).Checked = True
End Sub
Sub GSTabFrame1_Deactivated (Index As Integer, Cancel As Integer)
mnuVTab(Index).Checked = False
End Sub
Sub GSToolTip1_GetToolTip (FrmName As String, CtlName As String, ToolTip As String)
Dim n As Integer
If CtlName = "Image2(1)" Then
GSToolTip1.BackColor = RGB(128, 255, 255)
ToolTip = "This is a multi-line tool tip."
ToolTip = ToolTip & Chr$(10) & "You can have as many lines"
ToolTip = ToolTip & Chr$(10) & "as you like (within reason)."
Else
GSToolTip1.BackColor = RGB(255, 255, 128)
n = InStr(ToolTip, ":")
If n > 0 Then ToolTip = Left$(ToolTip, n - 1)
End If
End Sub
Sub GSToolTip1_GotFocus (FrmName As String, CtlName As String, TagText As String)
Dim n As Integer
Dim status As String
' show parameters
lblGotFocusFrmName = FrmName
lblGotFocusCtlName = CtlName
' use Tag to get status bar text for control
status = TagText
' strip tool tip text from start of Tag
n = InStr(status, ":")
If n > 0 Then status = Mid$(status, n + 1)
' strip status bar text from start of Tag
n = InStr(status, ":")
If n > 0 Then status = Mid$(status, n + 1)
' display focus text for this control
If status <> "" Then lblStatus.Caption = status
End Sub
Sub GSToolTip1_LostFocus (FrmName As String, CtlName As String)
' show parameters
lblLostFocusFrmName = FrmName
lblLostFocusCtlName = CtlName
' restore status bar
lblStatus.Caption = "Ready"
End Sub
Sub GSToolTip1_MenuSelect (MenuName As String, MenuCaption As String, TagText As String)
' show parameters
lblMenuName = MenuName
lblMenuCaption = MenuCaption
' update status bar
If MenuName = "" Then
lblStatus.Caption = "Ready"
ElseIf MenuName = "System" Then
lblStatus = "System menu: " & MenuCaption
Else
lblStatus = TagText
End If
End Sub
Sub GSToolTip1_MouseEnter (FrmName As String, CtlName As String, TagText As String)
Dim n As Integer
Dim status As String
' show parameters
lblMouseEnterFrmName = FrmName
lblMouseEnterCtlName = CtlName
' use Tag to get status bar text for control
status = TagText
' strip tool tip text from start of Tag
n = InStr(status, ":")
If n > 0 Then status = Mid$(status, n + 1)
' strip focus change text from end of Tag
n = InStr(status, ":")
If n > 0 Then status = Left$(status, n - 1)
' display status bar text for this control
If status <> "" Then lblStatus.Caption = status
End Sub
Sub GSToolTip1_MouseExit (FrmName As String, CtlName As String)